package com.qiyang.sell.utils;

import com.qiyang.sell.vo.ResultVo;


/**
 * Created on 2018/7/1.
 *
 * @author sehuaqi.
 * 描述：
 */
public class ResultVOUtil {

    public static ResultVo success(Object object) {
        ResultVo resultVo = new ResultVo();
        resultVo.setData(object);
        resultVo.setCode(0);
        resultVo.setMsg("成功");

        return resultVo;
    }

    public static ResultVo success() {

        return success(null);
    }

    public static ResultVo error(Integer code, String msg) {
        ResultVo resultVo = new ResultVo();
        resultVo.setCode(code);
        resultVo.setMsg(msg);
        return resultVo;
    }

}
